﻿<html>
<head>
	<style type="text/css">
	.theme1-color
	{
		color: #f90;
	}
	.theme1-background
	{
		background-color: #f90;
	}
	.theme1-border
	{
		border-color: #f90 !important;
	}
	.theme2-color
	{
		color: #fc6;
	}
	.theme2-background
	{
		background-color: #fc6;
	}
	.theme2-border
	{
		border-color: #fc6 !important;
	}
	.theme3-color
	{
		color: #fff8df;
	}
	.theme3-background
	{
		background-color: #fff8df;
	}
	.theme2-border
	{
		border-color: #fff8df !important;
	}
	.contrast1-color
	{
		color: #488E00;
	}
	.contrast1-background
	{
		background-color: #488E00;
	}
	.contrast1-border
	{
		border-color: #488E00 !important;
	}
	.contrast2-color
	{
		color: #C3DE6C;
	}
	.contrast2-background
	{
		background-color: #C3DE6C;
	}
	.contrast1-border
	{
		border-color: #C3DE6C !important;
	}
	.blank-background
	{
		background-color: White;
	}
	html
	{
		font-size: 100.01%;
	}
	body, p, h1, h2, h3, h4, h5, h6, li, tr, td, th, dd, dt
	{
		font-family: Verdana,Arial,Sans-Serif;
		font-size: 10pt;
		line-height: 1.2em;
	}
	body
	{
		background-color: #fff;
		margin: 0;
	}
	h1, h2, h3, h4, h5, th
	{
		font-weight: bold;
	}
	h1
	{
		padding-bottom: 0;
		color: #488E00;
		margin-top: 10px;
		text-align: left;
		margin-bottom: 5px;
		letter-spacing: -1px;
	}
	h2, h3, h5
	{
		color: #f90;
	}
	h1
	{
		font-size: 1.6em;
	}
	h2
	{
		font-size: 13pt;
	}
	h3
	{
		font-size: 11pt;
	}
	h4
	{
		font-size: 10pt;
	}
	h5
	{
		font-size: 9pt;
		font-weight: bold;
		margin-bottom: 2px;
	}
	h6
	{
		font-size: 65%;
		color: #666;
		font-weight: normal;
	}
	acronym
	{
		cursor: help;
		border-bottom: 1px dashed #666;
	}
	pre
	{
		background-color: #FBEDBB;
		padding: 6px;
		font: 9pt "Courier New" ,Courier,mono;
		white-space: pre;
		overflow: auto !important;
		border: solid 1px #FBEDBB;
	}
	code
	{
		color: #900;
		font: 11pt "Courier New" ,Courier,mono;
	}
	kbd
	{
		background-color: #EEE;
		border-color: #CCC #AAAAAA #888 #BBBBBB;
		border-style: solid;
		border-width: 1px 3px 3px 1px;
		color: #000;
		padding: 2px 4px;
		white-space: nowrap;
	}
	table
	{
		background-color: Transparent;
	}
	img
	{
		-ms-interpolation-mode: bicubic;
	}
	dt
	{
		font-weight: bold;
		margin-top: 10px;
		margin-bottom: 6px;
	}
	dd
	{
		margin-bottom: 6px;
		margin-left: 25px;
	}
	a
	{
		text-decoration: none;
		color: #004cd5;
	}
	a:visited
	{
		color: #800080;
	}
	a:active
	{
		text-decoration: underline;
	}
	a:hover
	{
		text-decoration: underline;
	}
	a:focus
	{
		outline: none;
	}
	.container-article #content-div a[name]
	{
		color: inherit;
		text-decoration: none;
	}
	tt.equation
	{
		font-family: 'Times New Roman' ,serif;
		font-size: 10pt;
		font-style: italic;
		white-space: pre;
	}
	ul.outdent
	{
		padding-left: 15px;
		margin-left: 0;
		margin-bottom: 5px;
		margin-top: 5px;
	}
	ul.outdent li
	{
		padding-bottom: 2px;
		font-size: 8pt;
	}
	ul.download LI, LI.download
	{
		list-style-image: url(/images/download.gif);
		padding-left: .5em;
	}
	ul.compact
	{
		list-style-type: none;
		margin: 0;
		padding-left: 3px;
		line-height: 1.4em;
	}
	ul.spaced, ol.spaced
	{
		margin: 3px;
	}
	ul.spaced li, ol.spaced li
	{
		margin: 10px 0 10px 0; *margin:10px010px25px;}
	ul.tight, ol.tight
	{
		margin: 0;
		padding-left: 15px !important;
	}
	ul.delegate li, li.delegate
	{
		list-style-image: url(/images/symbols/delegate.gif);
	}
	ul.enum li, li.enum
	{
		list-style-image: url(/images/symbols/Enum.GIF);
	}
	ul.event li, li.event
	{
		list-style-image: url(/images/symbols/event.GIF);
	}
	ul.interface li, li.interface
	{
		list-style-image: url(/images/symbols/interface.GIF);
	}
	ul.literal li, li.literal
	{
		list-style-image: url(/images/symbols/literal.GIF);
	}
	ul.method li, li.method
	{
		list-style-image: url(/images/symbols/method.GIF);
	}
	ul.namespace li, li.namespace
	{
		list-style-image: url(/images/symbols/namespace.GIF);
	}
	ul.property li, li.property
	{
		list-style-image: url(/images/symbols/property.GIF);
	}
	ul.struct li, li.struct
	{
		list-style-image: url(/images/symbols/struct.GIF);
	}
	ul.compactlist li, li.compactlist
	{
		list-style-image: url(/images/smallarrow.gif);
		font-size: 8pt;
		margin-left: -1em;
		margin-bottom: 0;
	}
	ul.compactlist
	{
		margin-top: 5px;
		margin-bottom: 5px;
	}
	ul.horizontal li
	{
		display: inline;
		padding: .2em 1em;
	}
	.long-element
	{
		width: 500px;
	}
	.short-element
	{
		width: 50px;
	}
	a.button, a.button-large, .button, .button-large
	{
		color: white;
		background-color: #E08900;
		border-width: 2px;
		border-style: outset;
		font-weight: bold;
		text-decoration: none !important;
		white-space: nowrap;
		font-size: 100%;
		padding: 2px;
	}
	button.button
	{
		font-size: 90%;
	}
	.button:active
	{
		border-style: inset;
	}
	.button:hover, .button-large:hover
	{
		border-style: outset;
	}
	.button-large
	{
		font-size: 10pt !important;
		padding: 4px 9px;
	}
	div a.button.safe, div a.button.unsafe
	{
		color: white !important;
	}
	input[type=text]:focus, textarea:focus
	{
		border: 2px solid #A0ACBF;
	}
	input[type=radio]
	{
		border: none;
	}
	.small-text, .small-text li, .small-text td
	{
		font-size: 8pt !important;
	}
	.tiny-text, input-prompt, .action-link
	{
		font-size: 7pt;
	}
	.medium-text
	{
		font-size: 10pt;
	}
	.large-text
	{
		font-size: 13pt;
		font-weight: bold;
	}
	.align-left
	{
		text-align: left !important;
	}
	.align-right
	{
		text-align: right !important;
	}
	.align-center
	{
		text-align: center;
	}
	.align-justify
	{
		text-align: justify;
	}
	.align-top
	{
		vertical-align: top;
	}
	.align-middle
	{
		vertical-align: middle;
	}
	.align-bottom
	{
		vertical-align: bottom;
	}
	.float-right
	{
		float: right;
	}
	.float-left
	{
		float: left;
	}
	.float-center
	{
		margin: auto;
	}
	.top-left-fixed
	{
		position: relative;
		top: 0;
		left: 0;
	}
	.z-index-top
	{
		z-index: 10000;
	}
	.z-index-bottom
	{
		z-index: 0;
	}
	.extended
	{
		width: 100%;
	}
	.padded
	{
		padding: 10px;
	}
	.tight
	{
		margin: 0 !important;
		padding: 0 !important;
	}
	.spaced
	{
		margin: 10px;
	}
	.nowrap
	{
		white-space: nowrap;
	}
	.wrap
	{
		white-space: normal;
	}
	.fixed-layout
	{
		table-layout: fixed;
	}
	.clip-text
	{
		text-overflow: ellipsis;
	}
	.clipped
	{
		overflow: hidden;
	}
	.fluid
	{
		max-width: 10000px !important;
		width: auto !important;
	}
	.loading
	{
		background: white url(/images/animated_loading.gif) no-repeat center center;
	}
	.no-color, .no-colour, .no-color span, .no-colour span
	{
		color: black !important;
	}
	.border-none
	{
		border-style: none !important;
	}
	.border-none-left
	{
		border-left-style: none !important;
	}
	.border-none-right
	{
		border-right-style: none !important;
	}
	.border-none-sides
	{
		border-right-style: none !important;
		border-left-style: none !important;
	}
	.border-none-top
	{
		border-top-style: none !important;
	}
	.border-none-bottom
	{
		border-bottom-style: none !important;
	}
	.pre-wrap
	{
		white-space: pre-wrap;
		white-space: -moz-pre-wrap;
		white-space: -pre-wrap;
		white-space: -o-pre-wrap;
		word-wrap: break-word;
		_white-space: pre;
	}
	.header
	{
		background-color: #f90;
	}
	.toplinks
	{
		font-size: 8pt;
		color: #333;
		background-color: White;
		letter-spacing: -1px;
		padding: 2px;
	}
	.footer
	{
		margin: auto;
	}
	.row
	{
		zoom: 1;
		overflow: hidden;
	}
	.column
	{
		display: inline;
		float: left;
	}
	.column8_1
	{
		width: 12%;
		float: left;
	}
	.column8_2
	{
		width: 25%;
		float: left;
	}
	.column8_3
	{
		width: 37%;
		float: left;
	}
	.column8_4
	{
		width: 50%;
		float: left;
	}
	.column8_5
	{
		width: 62%;
		float: left;
	}
	.column8_6
	{
		width: 75%;
		float: left;
	}
	.column8_7
	{
		width: 87%;
		float: left;
	}
	.access-link
	{
		position: absolute;
		top: 0;
		left: 0;
		width: 1px;
		height: 1px;
		z-index: 100;
		border-style: none;
		overflow: hidden;
	}
	.scroll-list
	{
		overflow: auto;
		border-width: 1px;
		border-color: Gray;
		border-style: solid;
		font-size: 8pt;
		scrollbar-arrow-color: white;
		scrollbar-face-color: #f90;
		height: 150px;
	}
	.box .scroll-list
	{
		width: 120px;
		font-size: 7pt;
		white-space: nowrap;
		text-overflow: clip;
	}
	.box .scroll-list .sub-item
	{
		padding-left: 10px;
		font-size: 7pt;
		white-space: nowrap;
		text-overflow: clip;
	}
	.box
	{
		margin-bottom: 10px;
		padding: 5px;
		font-size: 8pt;
		border: solid 1px #ddd;
		border-bottom-left-radius: 5px;
		-moz-border-radius-bottomleft: 5px;
		-webkit-borderbottom-left-radius: 5px;
		border-bottom-right-radius: 5px;
		-moz-border-radius-bottomright: 5px;
		-webkit-border-bottom-right-radius: 5px; *zoom:1;_zoom:1;}
	.box.header
	{
		padding: 2px 2px 2px 5px;
		color: Black;
		font-family: Verdana,Arial,Sans-Serif;
		font-size: 13pt;
		font-weight: bold;
		background-color: #EEE;
		border: solid 1px #ddd;
		border-bottom-style: none;
		margin-bottom: 0;
		border-bottom-left-radius: 0;
		-moz-border-radius-bottomleft: 0;
		-webkit-borderbottom-left-radius: 0;
		border-bottom-right-radius: 0;
		-moz-border-radius-bottomright: 0;
		-webkit-border-bottom-right-radius: 0;
	}
	.box.header.feature
	{
		padding: 2px 2px 2px 5px;
		color: Black;
		font-family: Verdana,Arial,Sans-Serif;
		font-size: 13pt;
		font-weight: bold;
		background-color: #fff8df;
		border: solid 1px #f90;
		border-bottom-style: none;
		margin-bottom: 0;
		_text-transform: none;
		_font-family: Verdana,Arial,Sans-Serif;
		_font-size: 8pt;
		_background-color: #fff8df;
		_border: 0;
		_font-weight: normal;
	}
	.answers .box
	{
		border: 0;
	}
	.question .box
	{
		padding: 10px;
		margin: 10px 0;
		border-radius: 5px;
		-moz-border-radius: 5px;
		-webkit-border-radius: 5px;
	}
	.popup
	{
		display: none;
	}
	.raised
	{
		background-color: #fff8df;
		-moz-box-shadow: #999 5px 5px 10px 1px;
		-webkit-box-shadow: #999 5px 5px 10px 1px;
		box-shadow: #999 5px 5px 10px 1px;
	}
	table.data td
	{
		padding: 1px;
	}
	div.box, td.box
	{
		_font-size: 8pt;
		_font-weight: normal;
		_text-transform: none;
		_margin-bottom: 10px;
	}
	div.header, td.header
	{
		_background-color: #f90;
		_font-size: 13px !important;
		_font-weight: bold !important;
		_margin-bottom: 0;
		_border: 0;
	}
	div.box table.data
	{ *width:95%!important;_width:95%!important;}
	.feature
	{
		background-color: #fff8df;
		border-color: #f90;
	}
	.button-group
	{
		white-space: nowrap;
		padding-right: 1em;
		margin: 0;
	}
	.hover-container
	{
		display: block;
		position: relative;
	}
	* + html .hover-row .hover-container
	{
		position: static;
	}
	* + html .hover-row .hover-container .button-group
	{
		position: relative;
		float: right;
	}
	.hover-container .button-group, .hover-row .button-group
	{
		display: none;
	}
	.hover-container .button-group-tight, .hover-row .button-group-tight
	{
		visibility: hidden;
	}
	.hover-row.hover, .hover-row.hover td, .hover-row:hover, .hover-row:hover td
	{
		background-color: #fff8df !important;
	}
	.hover .button-group, .hover-container:hover .button-group
	{
		background-color: inherit;
		margin: 0;
		position: absolute;
		top: 0;
		right: 3px;
		display: block;
	}
	.hover-container:hover .button-group-tight
	{
		background-color: inherit;
		visibility: visible;
	}
	.cloud .hover-container:hover .button-group
	{
		top: auto;
		bottom: 0;
		right: 0;
	}
	.tag-info .button-group
	{
		top: 0;
	}
	.title-addenda
	{
		margin-top: 15px;
		float: right;
		text-align: right;
		font-size: .85em;
		font-weight: normal;
	}
	.spacer
	{
		height: 20px;
	}
	.divider
	{
		color: #f90;
		background-color: #f90;
		height: 1px;
		margin: 0;
		padding: 0;
		border: none;
	}
	.divider-faint
	{
		border-style: none;
		color: #CCC;
		background-color: #CCC;
		height: 1px;
		padding: 0;
		margin: 0;
	}
	.breadcrumb
	{
		font-size: 8pt;
	}
	.toolbar
	{
		border: solid 1px transparent;
		_border: solid 1px white;
		padding: 1px;
		-webkit-transition: border-color .1s linear;
		-moz-transition: border-color .1s linear;
		-o-transition: border-color .1s linear;
		transition: border-color .1s ease-in;
		-webkit-transition: background-color .1s linear;
		-moz-transition: background-color .1s linear;
		-o-transition: background-color .1s linear;
		transition: background-color .1s linear;
	}
	.toolbar:hover
	{
		border: solid 1px #f90;
		background-color: #fc9;
		-webkit-transition: border-color .1s linear;
		-moz-transition: border-color .1s linear;
		-o-transition: border-color .1s linear;
		transition: border-color .1s ease-in;
		-webkit-transition: background-color .1s linear;
		-moz-transition: background-color .1s linear;
		-o-transition: background-color .1s linear;
		transition: background-color .1s linear;
	}
	.active .toolbar
	{
		border: 1px solid #fc6;
	}
	img.toolbar
	{
		padding: 2px;
		border: solid 1px transparent;
		vertical-align: bottom;
	}
	img:hover.toolbar
	{
		border: solid 1px #fff8df !important;
	}
	button.toolbar
	{
		border: solid 1px white;
		background-color: white;
		padding: 0;
		margin: 0;
		padding: 1px;
	}
	.list-socialbookmark
	{
		position: absolute;
		top: -90px;
		left: -5000px;
		z-index: 200;
		display: none;
		white-space: nowrap;
		padding: 10px;
		border: 2px solid #f90;
		background-color: #ffc;
		border-radius: 5px;
		-moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		text-align: left;
	}
	.search-bar
	{
		padding: 2px 5px;
	}
	.admin-bar
	{
		margin: 0 20px;
	}
	.search-bar input.search
	{
		background: white url(/Images/search.gif) no-repeat right;
		width: 225px;
	}
	.search-bar .search-advanced
	{
		padding: 8px;
		width: 205px;
		z-index: 1000;
		background-color: #fff8df;
		border: solid 1px #ccc;
		box-shadow: 2px 2px 7px rgba(0,0,0,0.5);
		-moz-box-shadow: 2px 2px 7px rgba(0,0,0,0.5);
		-webkit-box-shadow: 2px 2px 7px rgba(0,0,0,0.5);
		position: absolute;
		top: 1px;
		right: 5px;
	}
	.search-bar:hover .popup
	{
		display: block;
	}
	.search-highlight
	{
		border-bottom: 1px dotted #f90;
		font-weight: bold;
	}
	.search-box
	{
		padding: 20px 0;
		font-weight: bold;
		white-space: nowrap;
		font-size: 14px;
	}
	.search-box input
	{
		font-size: 18px;
	}
	.filter-options
	{
		background-color: transparent;
		padding: 10px 0;
	}
	.filter-pane
	{
		width: 160px;
		float: left;
		margin-left: -5px;
		background-color: white;
	}
	.filter-pane .menu1
	{
		padding: 2px 2px 3px 0;
		font-size: 11pt;
		font-weight: bold;
		margin: 0;
		letter-spacing: 0;
		background-color: transparent;
		color: Black;
		margin-bottom: 5px;
		border: 0;
	}
	.filter-pane .menu1 a
	{
		color: #004cd5 !important;
	}
	.filter-pane .menu2
	{
		background-color: transparent;
		border: none;
		margin-bottom: 10px;
		font-size: 9pt;
		font-family: Verdana,arial,Sans-Serif;
		font-weight: normal;
	}
	.filter-pane .menu2 label, .filter-pane .menu2 a
	{
		color: #004cd5;
	}
	.filter-pane .options
	{
		border-top: 1px solid #f90;
		border-bottom: 1px solid #f90;
	}
	.filter-pane .options label
	{
		color: Black;
	}
	.filter-pane .advanced
	{
		padding-left: 0;
	}
	</style>
</head>
<body>
	<pre>
Title:		 Myotragus: Localizable Data with NHibernate
Author:		Type Your Code Project User Name
Email:		 Type Code Project E-mail Login
Member ID:	 12345 (seen from Settings, in URL "mid=12345")
Language:	Type Languages that Apply to Your Article (C# 3.0, etc.)
Platform:	Type Platforms that Apply to Your Article (Windows, etc.)
Technology:	NHibernate, .NET
Level:		 Intermediate
Description: A library and some ideas to work with localizable data on NHibernate
Section		Type the Code Project Section you Wish the Article to Appear
SubSection	 Type the Code Project SubSection you Wish the Article to Appear
License:	 CPOL (default - select your desired license from our list)</pre>
	<h2>
	Introduction
	</h2>
	<p>
		I live in a 2 official languages island, there very strong foreinger communities 
		(mainly germans and british), 4 languages in total. Localizable contents are a 
		fact around this place. If you&#39;re web site isn&#39;t localized you&#39;d be losing 
		clients. It&#39;s very hard to work with localized data.</p>
	<p>
	Have you ever built a localizable database application? I have, and so many times. Lately, I've been using NHibernate, I love it. As
	soon as I got into it, I started looking for solutions to that very same problem: handling
	multilingual data.
		In this paper I&#39;ll show you how to use this library, and a little bit about how 
		it has been done. A very small MVC project and sample data would be used for 
		examples.</p>
	<p>
	Let's take a look at the following MVC action code:
	</p>
<pre>
	public ActionResult Index()	{
		return View(Repository.FindAll(CultureHelper.Current.LCID));
	}
</pre>
	<p>
	It gets a product repository from an IoC container and asks it for the whole 
		products&#39; list in current locale. Let&#39;s asume there is some mechanism to change 
		that current locale value, and store it along with user profile, 
	session or so.</p>
	<p>
	The great thing about this code is the model. No method has been implemented to
	get the repository to work, only some very few declarations and a very long application
	initialization section is just what it takes to use Myotragus.	 </p>
<pre>
	[Entity("Products", IdColumn="ProductId")]public interface IProduct : IEntity&lt;int&gt;
	{
		[Localizable]
		string Name { get; set; }
		[Localizable]
		string Description { get; set; }
		}
		...
	public interface IProductRepository : IDefaultsLocalizableReadRepository&lt;IProduct&gt;, 
		IDefaultsLocalizableWriteRepository&lt;int, IProduct&gt;
	{
	}
		...
		public class ProductRepository : Repository&lt;IProduct&gt;, IProductRepository
		{
		public ProductRepository(IEntitiesContainer entities) : base(entities)
			{
			}
		}
</pre>
	<p>
	That's about it...A whole web site (a small one) with no much more than a couple
	interfaces and almost just a constructor (for the IoC to inject a dependency,
	we'll talk about it later).
	</p>
	<p>
	Actually the whole magic occurs in extension methods rather than base class <code>
		Repository&lt;TEntity&gt;</code>. This way they won't interfere in existing hierarchies.
	In Myotragus, repositories are singleton, so better not to load them with state
	data, cause if some of them gets corrupted, your whole application would need to
	be restarted.
	</p>
	<p>
	The entire Controller would look like:</p>
	<pre>
	
	public class ProductController : Controller
	{
	private IProductRepository _repository;
	public IProductRepository Repository
	{
		get
		{
		return _repository ?? (_repository = Core.Container.Resolve&lt;IProductRepository&gt;());
		}
	}

	public ActionResult Index()
	{
		return View(Repository.FindAll(CultureHelper.Current.LCID));
	}

	public ActionResult Details(int id)
	{
		return View(Repository.Load(CultureHelper.Current.LCID, id));
	}

	public ActionResult Edit(int id, string culture)
	{
	if (id == 0)
			return View(Repository.New());
	
			culture = culture ?? CultureHelper.Current.Name;
			var lcId = CultureHelper.GetCulture(culture).LCID;

			return View(Repository.Load(lcId, id));
	}

	[HttpPost]
	public ActionResult Edit(int id, string culture, FormCollection postData)
	{
		culture = culture ?? CultureHelper.Current.Name;
		var lcId = CultureHelper.GetCulture(culture).LCID;

		var item = Repository.Load(lcId, id);
		UpdateModel(item, postData);
		Repository.Save(lcId, item);
		ViewData["culture"] = culture;

		return RedirectToAction("Edit", new { id, locale = culture });
	}

	public ActionResult Delete(int id)
	{
		var item = Repository.Load(CultureHelper.Current.LCID, id);
		Repository.Delete(item);

		return RedirectToAction("Index");
	}
	}
	</pre>
	<p>
	Can you imagine? Crud operations made this easy, and multilanguage operations. 
		But, what about more complex operations. Like references.</p>
	<h2>
	Creating the Model</h2>
	<p>
	Myotragus is build on top of nhibernate. You&#39;ll still need to configure your 
	xml section, and make some hbm files by hand. Myotragus would generate some 
	mappings for you, and maybe more and more complex in the future. Right now, only 
	the very simplests mappings would be automatic.</p>
	<p>
	Your model would basically define entities (POCOs) and providers, usual read and 
	write operations would magically work without doing much.</p>
	<h2>
	The Domain</h2>
	<p>
	You can still define your old classes and create the mappings by hand. But if 
	you want myotragus to create those most straigh forward for you, you&#39;ll just 
	need to create decorated interfaces.</p>
	<pre>[Entity(&quot;TableName&quot;, IdColumn=&quot;IdColumn&quot;)]
public interface IMyEntity : IEntity&lt;int&gt;
{
	string Name { get; set; }
	string Description { get; set;}
	DataTime Created { get; set; }
	DateTime Modified { get; set; }
	string Owner { get; set; }
	string Group { get; set;}
}</pre>
	<p>
	The Repositories</p>
	<p>
	There are 3 kind of repositories.</p>
	<ul>
	<li>Normal. They'd just read and write simple pocos.</li>
	<li>Localizable. Same, but localizable fields would be read only in specified 
		language, not additional values would be loaded. When saving there would be some 
		overload.</li>
	<li>Defaults Localizable. Same, but you&#39;d be able to specified a default locale to 
		use if the one asked for is not available. Oviously the best one. Why not using 
		this one always?? Efficency.</li>
	</ul>
	<p>
	As you might find in my references. Localized data is a real mess. Don&#39;t get 
	into it unless you really need it (but I do so). Following table shows some 
	statistics so can have an idea.</p>
	<pre>public interface IMyEntityRepository : IReadRepository&lt;IMyEntity&gt;, IWriteRepository 
{
}
public interface ILocalizableMyEntityRepository : ILocalizableReadRepository&lt;IMyEntity&gt;, ILocalizableWriteRepository&lt;int, IMyEntity&gt; 
{
}
public interface IDefaultsLocalizableMyEntityRepository : IDefaultsLocalizableReadRepository&lt;IMyEntity&gt;, 
	IDefaultsLocalizableWriteRepository&lt;int, IMyEntity&gt; 
{
}
 </pre>
	<p>
	An empty implementation would do the job, just inherit from Repository and no 
	even interface members would bother you.</p>
	<p>
	As you can see read and write operations have been discriminated. Yeah...Some 
	times you don&#39;t need both, or you have some implementation for one of them, or 
	....whatever, this way is easier to extend and/or modify.</p>
	<p>
	I&#39;ve never been so good with examples, as you can see. This wonderful entity 
	defines some usual properties any entity could have. With the entity attribute 
	we ensure the table name and Id column name would be correct when mapping.	 </p>
	<p>
	And if we want to use localizable properties we'll just need to decorate 
		localizable properties.</p>
</body>
</html>
